package com.yang.springboot.web;

import com.yang.springboot.service.IStudentService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @author yanwei.yang
 * @date 2021/11/15 14:59
 * @description:
 */
@Controller
public class StudentController {

    @Resource
    private IStudentService studentService;

    @ResponseBody
    @RequestMapping("student")
    public Object student(Integer id) {
        return studentService.getById(id);
    }
}
